﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace CapaPresentacion.Converters
{
    class CmbSelectedItemToVisibilityConverter : System.Windows.Data.IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string valorseleccionado = value as string;


            switch (valorseleccionado ?? String.Empty)
            {
                    case "Otra":
                        return Visibility.Visible;

                    case "Otro":
                        return Visibility.Visible;
                    

                    case "Prematuro":
                        return Visibility.Visible;
                   

                    case "Prolongado":
                        return Visibility.Visible;
                   

                    case "Inducido":
                        return Visibility.Visible;                                    

                    case "Con fórceps":
                        return Visibility.Visible;
                   

                    case "Por cesárea":
                        return Visibility.Visible;
               

                    case "Otra Reacción":
                        return Visibility.Visible;

                    case "Acompañado":
                        return Visibility.Visible;
               

                    default:
                        return Visibility.Collapsed;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
